/*
 * ChessGame.h
 *
 *  Created on: Mar 8, 2011
 *      Author: Michael Ziminsky
 */

#ifndef CHESSGAME_H_
#define CHESSGAME_H_

#include <Typesfwd.h>
#include <model/ChessBoard.h>
#include <model/Location.h>
#include <list>

class ChessGame
{
	typedef std::list<myTypes::cPiece> pieceList;
	model::ChessBoard gameBoard;
	pieceList lights, darks;
	myTypes::cPiece lKing, dKing;

	bool validatePiece(const myTypes::cPiece&);
public:
	static const unsigned int MAXPLAYERPIECES = 16;

	bool addPiece(const model::Location&, const myTypes::cPiece);

	bool attemptMove(const model::Location&, const model::Location&);

	myTypes::moveSet getValidMoves(const model::Location&);

	void newGame();

	bool inCheck(bool, const model::ChessBoard&);

	bool inCheckMate(bool);
};

#endif /* CHESSGAME_H_ */
